
package com.jf.cloud.supplier.service;

import com.jf.cloud.common.database.dto.PageDTO;
import com.jf.cloud.common.database.vo.PageVO;
import com.jf.cloud.supplier.dto.SupplierWithdrawCashConfigDto;
import com.jf.cloud.supplier.dto.SupplierWithdrawCashDTO;
import com.jf.cloud.supplier.model.SupplierWithdrawCash;
import com.jf.cloud.supplier.vo.SupplierWithdrawCashLogExcelVO;
import com.jf.cloud.supplier.vo.SupplierWithdrawCashVO;

import java.util.List;

/**
 * 供应商提现申请信息
 *
 * @author zz
 * @date 2022-03-14 17:04:32
 */
public interface SupplierWithdrawCashService {

    /**
     * 分页获取商家提现申请信息列表
     * @param pageDTO 分页参数
     * @return 商家提现申请信息列表分页数据
     */
    PageVO<SupplierWithdrawCash> page(PageDTO pageDTO);

    /**
     * 根据商家提现申请信息id获取商家提现申请信息
     *
     * @param cashId 商家提现申请信息id
     * @return 商家提现申请信息
     */
    SupplierWithdrawCash getByCashId(Long cashId);

    /**
     * 保存商家提现申请信息
     * @param supplierWithdrawCash 商家提现申请信息
     */
    void save(SupplierWithdrawCash supplierWithdrawCash);

    /**
     * 更新商家提现申请信息
     * @param supplierWithdrawCash 商家提现申请信息
     */
    void update(SupplierWithdrawCash supplierWithdrawCash);

    /**
     * 根据商家提现申请信息id删除商家提现申请信息
     * @param cashId 商家提现申请信息id
     */
    void deleteById(Long cashId);

    /**
     * 根据店铺id提交提现申请
     * @param supplierWithdrawCashDTO
     * @param supplierId
     */
    void apply(SupplierWithdrawCashDTO supplierWithdrawCashDTO, Long supplierId);

    /**
     * 根据参数分页获取商家提现记录信息
     * @param pageDTO
     * @param supplierWithdrawCashDTO
     * @return
     */
    PageVO<SupplierWithdrawCashVO> pageByParam(PageDTO pageDTO, SupplierWithdrawCashDTO supplierWithdrawCashDTO);
    List<SupplierWithdrawCashLogExcelVO> listSupplierWithdrawCashLogExcel(SupplierWithdrawCashDTO supplierWithdrawCashDTO);
    /**
     * 根据id获取提现申请详情信息
     * @param cashId
     * @return
     */
    SupplierWithdrawCashVO getDetailByCashId(Long cashId);

    /**
     * 审核商家提现信息
     * @param supplierWithdrawCashDTO
     * @param userId
     */
    void auditWithdrawCash(SupplierWithdrawCashDTO supplierWithdrawCashDTO, Long userId);

    /**
     * 保存提现配置
     * @param shopWithdrawCashDto
     */
    void saveConfig(SupplierWithdrawCashConfigDto shopWithdrawCashDto);

    /**
     * 获取提现配置
     * @return
     */
    SupplierWithdrawCashConfigDto getConfig();

    /**
     * 检查提现金额
     * @param amount
     */
    void checkDrawCashAmount(Long amount);
}
